let times 
Page({
  data: {
    isShow:false,
    dateLayerVisible: false,
    currentDate: new Date().getTime(),
    startertment:'',
    endment:''
  },
  onInput(event) {
    this.setData({
      currentDate: event.detail,
    });
  },
  onChange(){
    // const res = e.detail
    // this.setData({name:res.name})
  },
  openDateLayer(e) { 
    // console.log(e);
    times = e.mark.id
    // console.log(times);
    this.setData({ dateLayerVisible: true }) 
  },
  closeDateLayer() { this.setData({ dateLayerVisible: false }) },
  selectDate(e) {
    // e.mark = times
    // 保存时间
    if (times === 'starte') {
      this.setData({
        dateLayerVisible: false,
        currentDate: e.detail,
        startertment: wx.$formatDate(e.detail)
      })  
    }else{
      this.setData({
        dateLayerVisible: false,
        currentDate: e.detail,
        endment: wx.$formatDate(e.detail)
      })  
    }
  },
  addDateLayer(){
    this.setData({startertment:'',endment:''})
  },
  closeDateLayer() {
    this.setData({ dateLayerVisible: false })
  },
})
